﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:Diagram="clr-namespace:Patterns4Net.ArchitectureExplorer.Diagram" 
                    xmlns:Relations="clr-namespace:Patterns4Net.ArchitectureExplorer.Diagram.Relations" 
                    xmlns:Graphviz4Net="clr-namespace:Graphviz4Net.WPF.ViewModels;assembly=Graphviz4Net">
    <DataTemplate DataType="{x:Type Diagram:Relation}">
        <Line X1="0" Y1="0" X2="0" Y2="15" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Relations:UsesArrow}">
        <Path Data="M 0,0 L 4,10 L 8,0" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Relations:AssociationArrow}">
        <Path Data="M 0,0 L 4,10 L 8,0 M 4,10 L 4,0" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Relations:InheritanceArrow}">
        <Path Data="M 0,0 L 8,0 L 4,10 L 0,0" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Relations:AggregationArrow}">
        <Polygon Points="3,0 6,5 3,10 0,5" Stroke="Black" StrokeThickness="1" Fill="Black"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Relations:CompositionArrow}">
        <Polygon Points="3,0 6,5 3,10 0,5" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Diagram:RelationArrow}">
        <Line X1="0" Y1="0" X2="0" Y2="10" Stroke="Black" StrokeThickness="1"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Graphviz4Net:EdgeViewModel}">
        <Path Data="{Binding Path=Data}"               
              Stroke="Black" 
              StrokeThickness="1">
            <Path.Style>
                <Style TargetType="{x:Type Path}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=Edge.RelationName}" Value="Uses">
                            <Setter Property="StrokeDashArray" Value="5, 2"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Path.Style>
        </Path>
    </DataTemplate>
</ResourceDictionary>